From: Daniel van Vugt Date: Fri, 21 Jan 2022 10:47:09 +0000 (+0800) Subject: workspace: Fix a signal leak in WorkspaceBackground X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~149 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ed7fe756ef41a4c6ba8515ad06d3cc166594898c;p=gnome-shell.git workspace: Fix a signal leak in WorkspaceBackground Part-of: --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 6c32f01da..1ad403f9f 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -939,7 +939,7 @@ class WorkspaceBackground extends St.Widget { this._workarea = Main.layoutManager.getWorkAreaForMonitor(monitorIndex); this._stateAdjustment = stateAdjustment; - stateAdjustment.connect('notify::value', () => { + this._adjustmentId = stateAdjustment.connect('notify::value', () => { this._updateBorderRadius(); this.queue_relayout(); }); @@ -1054,6 +1054,11 @@ class WorkspaceBackground extends St.Widget { global.display.disconnect(this._workareasChangedId); delete this._workareasChangedId; } + + if (this._adjustmentId) { + this._stateAdjustment.disconnect(this._adjustmentId); + delete this._adjustmentId; + } } });